<?php
/**
 * Created by PhpStorm.
 * User: jingshou
 * Date: 2017/8/28
 * Time: 2:26
 */

namespace app\admin\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        ['userName', 'require', '账号必填'],
    ];

    protected $scene = [
        'login' => ['userName', 'userPwd' => 'require'],
        'edit' => ['userName', 'userPwd' => 'confirm:userPwd1'],
    ];

    protected $message = [
        'userPwd.confirm' => '两次密码不一致'
    ];
}